#pragma once
#include <iostream>
#include <vector>
#include <string>
#include <stdexcept>
#include <cmath>

class Point
{
public:
	Point();
	Point(double x, double y);
	double x();
	double y();

private:
	double x_;
	double y_;
};
class LinearIneq
{
	friend std::ostream &operator<<(std::ostream &out, LinearIneq &obj)
	{
		out << "ineq1 coff_x is:" << obj.coff_x() << std::endl
			<< "ineq1 coff_y is:" << obj.coff_y() << std::endl
			<< "ineq1 coff_const is:" << obj.coff_const() << std::endl;
		return out;
	}

public:
	LinearIneq() = delete;
	LinearIneq(Point &point1, Point &point2, Point inner_point = Point());
	double coff_x();
	double coff_y();
	double coff_const();
	bool is_greater_than_zero();
	void set_greater_than_zero(Point inner_point);

private:
	double coff_x_;
	double coff_y_;
	double coff_const_;
	bool is_greater_than_zero_;
};

class Poly2d
{
	friend std::ostream &operator<<(std::ostream &out, Poly2d &obj)
	{
		for (int i = 0; i < obj.ineq_vec_.size(); i++)
		{
			out << i << " ineq coff_x is:" << obj.ineq_vec_[i].coff_x() << std::endl
				<< i << " ineq coff_y is:" << obj.ineq_vec_[i].coff_y() << std::endl
				<< i << " ineq coff_const is:" << obj.ineq_vec_[i].coff_const() << std::endl
				<< i << " ineq is_greater_than_zero_ is:" << obj.ineq_vec_[i].is_greater_than_zero() << std::endl;
		}
		return out;
	}

public:
	Poly2d() = delete;
	Poly2d(std::vector<Point> &vetex_point, const Point inner_point);
	std::vector<LinearIneq> ineq_vec_;
};